package com.scpii.api.common;

import java.util.HashMap;
import java.util.Map;

public class Constants {

	public static Boolean IS_DEBUG;

	public static String RESOURCE_ROOT_PATH;

	public static String RESOURCE_ROOT_URL;

	public static String API_ROOT_URL;

	public static String UNIVERSAL_WEB_ROOT_URL;

	public static String UNIVERSAL_CONTENT_URL_TEMPLATE;

	public static String APP_NODES_INTERFACE_URL_TEMPLATE;

	public static String RESOURCE_INTERFACE_URL_TEMPLATE;

	public static String ARTICLES_INTERFACE_URL_TEMPLATE;

	public static String ADDRESS_INTERFACE_URL_TEMPLATE;

	public static String SMS_SEND_TEMPLATE;

	public static String INTEGRAL_TIPS_TEMPLATE;

	public static String UNIVERSAL_SCHEMA;

	// >>>>>>>>>>>PUSH START<<<<<<<<<<<<<<<<<<<<<<<<
	public static String PUSH_INTERVAL_TIME;

	public static String PUSH_FTP_HOST;

	public static String PUSH_FTP_PORT;

	public static String PUSH_USERNAME;

	public static String PUSH_PASSWORD;

	public static String PUSH_DIRECTORY;
	// >>>>>>>>>>>PUSH END<<<<<<<<<<<<<<<<<<<<<<<<<

	// >>>>>>>>>>>ALIPAY START<<<<<<<<<<<<<<<<<<<<<<<<
	public static String ALIPAY_NOTIFY_URL;

	public static String ALIPAY_CALL_BACK_URL;

	public static String ALIPAY_PAY_EXPIRE;

	// >>>>>>>>>>>ALIPAY END<<<<<<<<<<<<<<<<<<<<<<<<<

	public static final String[] RESOURCE_TYPES_IMAGES = new String[] { "jpg",
			"bmp", "jpeg", "gif", "png" };

	public static final String[] RESOURCE_TYPES_VIDEOS = new String[] { "mp4",
			"avi", "wmv", "mkv", "flv", "m4v", "mpg", "mpeg", "mov" };

	public static final String RFC3339_FORMAT = "yyyy-MM-dd'T'HH:mm:ss";

	public static final Boolean IS_LOGIN_FAILURE_LOCK = true;

	public static final Integer LOGIN_FAILURE_LOCK_TIME = 5;

	public static final Map<String, Long> TABLE_PRIKARY_KEY_START_POSITION = new HashMap<String, Long>();

	public static final String TABLE_PRIMARYKEY_MIDDLE = "0000000000";

	public static final Map<String, String> ROLES = new HashMap<String, String>();

	public static final String[] ROLES_ARRAY = new String[] { "ROLE_CLIENT",
			"ROLE_USER" };

	public static final Map<String, String> USERS_TYPES = new HashMap<String, String>();

	public static final String[] USERS_NON_ENABLE_TYPES_ARRY;

	public static final Map<String, String> THIRD_PARTY_LOGIN_TYPES = new HashMap<String, String>();

	public static final String[] THIRD_PARTY_USER_PROVIDER_ARRAY = new String[] {
			"T_SINA", "T_TENCENT", "PHONE" };

	public static final String[] USER_PROVIDER_ARRAY = new String[] { "PHONE" };

	public static final String PHONE_PROVIDER = "PHONE";

	public static final Map<String, String> ALL_USER_PROVIDERS = new HashMap<String, String>();

	public static final String USER_PASSWORD_FORMAT = "MD5";

	public static final String USER_DEFAULT_PSSWORD = "";

	public static final int IMAGE_MAX_DIM = 300;

	public static final Map<String, String> RESOURCES_MEDIA_TYPE = new HashMap<String, String>();

	public static final Integer PRIMARY_KEY_LENGTH = 12;

	public static final String REGISTER_ALLOW_KEY = "REGISTER_ALLOW_KEY";

	public static final String REGISTER_ALLOW_AREA = "REGISTER_ALLOW_AREA";

	public static final String[] WEIBO_KEY_ARRAY = new String[] { "T_SINA",
			"T_TENCENT" };

	/**
	 * 用户ID分割符，半角逗号
	 */
	public static final String ID_SEPARATOR = ",";

	public static final Map<String, Integer> USER_DEVICES_STATUS = new HashMap<String, Integer>();

	public static final Map<String, Long> CATEGORIES = new HashMap<String, Long>();

	static {
		TABLE_PRIKARY_KEY_START_POSITION.put("ACTIVITIES", 10l);
		TABLE_PRIKARY_KEY_START_POSITION.put("APPINFO", 110l);
		TABLE_PRIKARY_KEY_START_POSITION.put("APPINFO_UNIVERSAL", 111l);
		TABLE_PRIKARY_KEY_START_POSITION.put("CATEGORIES", 12l);
		TABLE_PRIKARY_KEY_START_POSITION.put("RESOURCES", 13l);
		TABLE_PRIKARY_KEY_START_POSITION.put("COMMENTS", 14l);
		TABLE_PRIKARY_KEY_START_POSITION.put("USER_ACTIONS", 15l);
		TABLE_PRIKARY_KEY_START_POSITION.put("USERS", 16l);
		TABLE_PRIKARY_KEY_START_POSITION.put("USERS_LINKS", 17l);
		TABLE_PRIKARY_KEY_START_POSITION.put("ADDRESS", 18l);
		TABLE_PRIKARY_KEY_START_POSITION.put("APP_CONFIGS", 19l);
		TABLE_PRIKARY_KEY_START_POSITION.put("APP_MODULES", 20l);
		TABLE_PRIKARY_KEY_START_POSITION.put("APP_NODES", 21l);
		TABLE_PRIKARY_KEY_START_POSITION.put("APP_ORDERS", 22l);
		TABLE_PRIKARY_KEY_START_POSITION.put("APP_ORDERS", 22l);
		TABLE_PRIKARY_KEY_START_POSITION.put("APP_TEMPLATES", 23l);

		TABLE_PRIKARY_KEY_START_POSITION.put("ARTICLES", 24l);
		TABLE_PRIKARY_KEY_START_POSITION.put("AUTO_USER_CARS", 25l);
		TABLE_PRIKARY_KEY_START_POSITION.put("AUTO_USER_IMPORTS", 26l);
		TABLE_PRIKARY_KEY_START_POSITION.put("DEVICES", 27l);
		TABLE_PRIKARY_KEY_START_POSITION.put("DICTS", 28l);
		TABLE_PRIKARY_KEY_START_POSITION.put("FIELD", 29l);
		TABLE_PRIKARY_KEY_START_POSITION.put("FIELD_VALUES", 30l);
		TABLE_PRIKARY_KEY_START_POSITION.put("TAG_VALUES", 31l);
		TABLE_PRIKARY_KEY_START_POSITION.put("TAGS", 32l);
		TABLE_PRIKARY_KEY_START_POSITION.put("USER_VISITS", 33l);

		// =======**************电商相关 start**************=======
		TABLE_PRIKARY_KEY_START_POSITION.put("EC_ORDER_DETAILS", 34L); // 订单详情
		TABLE_PRIKARY_KEY_START_POSITION.put("EC_ORDERS", 35L); // 订单
		TABLE_PRIKARY_KEY_START_POSITION.put("EC_PAYMENT_CONFIG", 36L);// 支付方式配置
		TABLE_PRIKARY_KEY_START_POSITION.put("EC_PRODUCT", 37L); // 商品
		TABLE_PRIKARY_KEY_START_POSITION.put("EC_SHOPPING_CAR", 38L); // 购物车
		TABLE_PRIKARY_KEY_START_POSITION.put("EC_PAYMENT_LOG", 39L); // 支付日志
		// =======**************电商相关 end****************=======

		TABLE_PRIKARY_KEY_START_POSITION.put("ACTIVITES_UNIVERSAL", 40l);

		// =======**************推送 start >>>>>>>>>**************=======
		TABLE_PRIKARY_KEY_START_POSITION.put("MESSAGE", 41L); // 推送消息
		TABLE_PRIKARY_KEY_START_POSITION.put("USER_CONFIGS", 42L); // 用户配置
		TABLE_PRIKARY_KEY_START_POSITION.put("USER_DEVICES", 43L); // 用户和设备之间的关系
		TABLE_PRIKARY_KEY_START_POSITION.put("USER_MESSAGE_DEVICES", 44L); // 用户消息
		TABLE_PRIKARY_KEY_START_POSITION.put("USER_MESSAGES", 45L); // 用户消息
		// =======**************推送 end >>>>>>>>>>>**************=======

		TABLE_PRIKARY_KEY_START_POSITION.put("USER_POINT_RANKS", 46l);
		TABLE_PRIKARY_KEY_START_POSITION.put("DEVICE_APP", 47L);
		TABLE_PRIKARY_KEY_START_POSITION.put("UNIVERSAL_CONTENT_TAB", 48l);// 通用版内容
		TABLE_PRIKARY_KEY_START_POSITION.put("USER_ACTION_POINT_CONFIG", 49l);
		TABLE_PRIKARY_KEY_START_POSITION.put("USER_POINT_HISTORY", 50l);
		TABLE_PRIKARY_KEY_START_POSITION.put("USER_ACTION_STATE", 51l);
		TABLE_PRIKARY_KEY_START_POSITION.put("USER_SHARE", 52l);
		TABLE_PRIKARY_KEY_START_POSITION.put("ENTERP_SHOP", 53l);// 门店

		TABLE_PRIKARY_KEY_START_POSITION.put("USER_FEED_BACK", 54l);
		TABLE_PRIKARY_KEY_START_POSITION.put("UNIVERSAL_CATELOG_TAB", 55l);//通用版分类

		ROLES.put("ROLE_CLIENT", "ROLE_CLIENT");
		ROLES.put("ROLE_USER", "ROLE_USER");

		USERS_TYPES.put("NORMAL", "NORMAL");
		USERS_TYPES.put("NOT_VERIF", "NOT_VERIF");
		USERS_TYPES.put("ANON", "ANON");

		USERS_NON_ENABLE_TYPES_ARRY = new String[] { USERS_TYPES
				.get("NOT_VERIF") };

		ALL_USER_PROVIDERS.put("PHONE", "PHONE");
		ALL_USER_PROVIDERS.put("T_SINA", "T_SINA");
		ALL_USER_PROVIDERS.put("T_TENCENT", "T_TENCENT");

		THIRD_PARTY_LOGIN_TYPES.put("T_SINA", "T_SINA");
		THIRD_PARTY_LOGIN_TYPES.put("T_TENCENT", "T_TENCENT");

		RESOURCES_MEDIA_TYPE.put("IMAGE", "IMAGE");
		RESOURCES_MEDIA_TYPE.put("VIDEO", "VIDEO");

		USER_DEVICES_STATUS.put("ON_LINE", 1);
		USER_DEVICES_STATUS.put("OFF_LINE", 0);

		CATEGORIES.put("REPAIR_RECORD", 16L);
		CATEGORIES.put("MAINNTENANCE_RECORD", 17l);
	}

}
